package orderEntity

import "github.com/goravel/framework/database/orm"

type Order struct {
	orm.Model
	Pid                    int64   `json:"pid" gorm:"column:pid" form:"pid"`                                                                   // 父类订单id
	OrderId                string  `json:"order_id" gorm:"column:order_id" form:"order_id"`                                                    // 订单号
	TradeNo                string  `json:"trade_no" gorm:"column:trade_no" form:"trade_no"`                                                    // 支付宝订单号
	Uid                    int64   `json:"uid" gorm:"column:uid" form:"uid"`                                                                   // 用户id
	RealName               string  `json:"real_name" gorm:"column:real_name" form:"real_name"`                                                 // 用户姓名
	UserPhone              string  `json:"user_phone" gorm:"column:user_phone" form:"user_phone"`                                              // 用户电话
	UserAddress            string  `json:"user_address" gorm:"column:user_address" form:"user_address"`                                        // 详细地址
	CartId                 string  `json:"cart_id" gorm:"column:cart_id" form:"cart_id"`                                                       // 购物车id
	FreightPrice           float64 `json:"freight_price" gorm:"column:freight_price" form:"freight_price"`                                     // 运费金额
	TotalNum               int64   `json:"total_num" gorm:"column:total_num" form:"total_num"`                                                 // 订单商品总数
	TotalPrice             float64 `json:"total_price" gorm:"column:total_price" form:"total_price"`                                           // 订单总价
	TotalPostage           float64 `json:"total_postage" gorm:"column:total_postage" form:"total_postage"`                                     // 邮费
	PayPrice               float64 `json:"pay_price" gorm:"column:pay_price" form:"pay_price"`                                                 // 实际支付金额
	PayPostage             float64 `json:"pay_postage" gorm:"column:pay_postage" form:"pay_postage"`                                           // 支付邮费
	DeductionPrice         float64 `json:"deduction_price" gorm:"column:deduction_price" form:"deduction_price"`                               // 抵扣金额
	CouponId               int64   `json:"coupon_id" gorm:"column:coupon_id" form:"coupon_id"`                                                 // 优惠券id
	CouponPrice            float64 `json:"coupon_price" gorm:"column:coupon_price" form:"coupon_price"`                                        // 优惠券金额
	Paid                   int8    `json:"paid" gorm:"column:paid" form:"paid"`                                                                // 支付状态
	PayTime                int64   `json:"pay_time" gorm:"column:pay_time" form:"pay_time"`                                                    // 支付时间
	PayType                string  `json:"pay_type" gorm:"column:pay_type" form:"pay_type"`                                                    // 支付方式
	AddTime                int64   `json:"add_time" gorm:"column:add_time" form:"add_time"`                                                    // 创建时间
	Status                 int8    `json:"status" gorm:"column:status" form:"status"`                                                          // 订单状态（-1 : 申请退款 -2 : 退货成功 0：待发货；1：待收货；2：已收货；3：待评价；-1：已退款）
	IsStockUp              int8    `json:"is_stock_up" gorm:"column:is_stock_up" form:"is_stock_up"`                                           // 是否备货中
	RefundStatus           int8    `json:"refund_status" gorm:"column:refund_status" form:"refund_status"`                                     // 0 未退款 1 申请中 2 已退款
	RefundType             int8    `json:"refund_type" gorm:"column:refund_type" form:"refund_type"`                                           // 退款申请类型
	RefundExpress          string  `json:"refund_express" gorm:"column:refund_express" form:"refund_express"`                                  // 退货快递单号
	RefundExpressName      string  `json:"refund_express_name" gorm:"column:refund_express_name" form:"refund_express_name"`                   // 退货快递名称
	RefundReasonWapImg     string  `json:"refund_reason_wap_img" gorm:"column:refund_reason_wap_img" form:"refund_reason_wap_img"`             // 退款图片
	RefundReasonWapExplain string  `json:"refund_reason_wap_explain" gorm:"column:refund_reason_wap_explain" form:"refund_reason_wap_explain"` // 退款用户说明
	RefundReasonTime       int64   `json:"refund_reason_time" gorm:"column:refund_reason_time" form:"refund_reason_time"`                      // 退款时间
	RefundReasonWap        string  `json:"refund_reason_wap" gorm:"column:refund_reason_wap" form:"refund_reason_wap"`                         // 前台退款原因
	RefundReason           string  `json:"refund_reason" gorm:"column:refund_reason" form:"refund_reason"`                                     // 不退款的理由
	RefundPrice            float64 `json:"refund_price" gorm:"column:refund_price" form:"refund_price"`                                        // 退款金额
	DeliveryName           string  `json:"delivery_name" gorm:"column:delivery_name" form:"delivery_name"`                                     // 快递名称/送货人姓名
	DeliveryCode           string  `json:"delivery_code" gorm:"column:delivery_code" form:"delivery_code"`                                     // 快递公司编码
	DeliveryType           string  `json:"delivery_type" gorm:"column:delivery_type" form:"delivery_type"`                                     // 发货类型
	DeliveryId             string  `json:"delivery_id" gorm:"column:delivery_id" form:"delivery_id"`                                           // 快递单号/手机号
	KuaidiLabel            string  `json:"kuaidi_label" gorm:"column:kuaidi_label" form:"kuaidi_label"`                                        // 快递单号图片
	KuaidiTaskId           string  `json:"kuaidi_task_id" gorm:"column:kuaidi_task_id" form:"kuaidi_task_id"`                                  // 快递单任务id
	KuaidiOrderId          string  `json:"kuaidi_order_id" gorm:"column:kuaidi_order_id" form:"kuaidi_order_id"`                               // 快递单订单号
	FictitiousContent      string  `json:"fictitious_content" gorm:"column:fictitious_content" form:"fictitious_content"`                      // 虚拟发货内容
	DeliveryUid            int64   `json:"delivery_uid" gorm:"column:delivery_uid" form:"delivery_uid"`                                        // 配送员id
	GainIntegral           float64 `json:"gain_integral" gorm:"column:gain_integral" form:"gain_integral"`                                     // 消费赚取积分
	UseIntegral            float64 `json:"use_integral" gorm:"column:use_integral" form:"use_integral"`                                        // 使用积分
	BackIntegral           float64 `json:"back_integral" gorm:"column:back_integral" form:"back_integral"`                                     // 给用户退了多少积分
	SpreadUid              int64   `json:"spread_uid" gorm:"column:spread_uid" form:"spread_uid"`                                              // 推广人uid
	SpreadTwoUid           int64   `json:"spread_two_uid" gorm:"column:spread_two_uid" form:"spread_two_uid"`                                  // 上上级推广人uid
	OneBrokerage           float64 `json:"one_brokerage" gorm:"column:one_brokerage" form:"one_brokerage"`                                     // 一级返佣金额
	TwoBrokerage           float64 `json:"two_brokerage" gorm:"column:two_brokerage" form:"two_brokerage"`                                     // 二级返佣金额
	Mark                   string  `json:"mark" gorm:"column:mark" form:"mark"`                                                                // 备注
	IsDel                  int8    `json:"is_del" gorm:"column:is_del" form:"is_del"`                                                          // 是否删除
	Unique                 string  `json:"unique" gorm:"column:unique" form:"unique"`                                                          // 唯一id(md5加密)类似id
	Remark                 string  `json:"remark" gorm:"column:remark" form:"remark"`                                                          // 管理员备注
	MerId                  int64   `json:"mer_id" gorm:"column:mer_id" form:"mer_id"`                                                          // 商户ID
	IsMerCheck             int8    `json:"is_mer_check" gorm:"column:is_mer_check" form:"is_mer_check"`                                        // 商户上传
	CombinationId          int64   `json:"combination_id" gorm:"column:combination_id" form:"combination_id"`                                  // 拼团商品id0一般商品
	PinkId                 int64   `json:"pink_id" gorm:"column:pink_id" form:"pink_id"`                                                       // 拼团id 0没有拼团
	Cost                   float64 `json:"cost" gorm:"column:cost" form:"cost"`                                                                // 成本价
	SeckillId              int64   `json:"seckill_id" gorm:"column:seckill_id" form:"seckill_id"`                                              // 秒杀商品ID
	BargainId              int64   `json:"bargain_id" gorm:"column:bargain_id" form:"bargain_id"`                                              // 砍价id
	AdvanceId              int64   `json:"advance_id" gorm:"column:advance_id" form:"advance_id"`                                              // 预售商品id
	VerifyCode             string  `json:"verify_code" gorm:"column:verify_code" form:"verify_code"`                                           // 核销码
	StoreId                int64   `json:"store_id" gorm:"column:store_id" form:"store_id"`                                                    // 门店id
	ShippingType           int8    `json:"shipping_type" gorm:"column:shipping_type" form:"shipping_type"`                                     // 配送方式 1=快递 ，2=门店自提
	ClerkId                int64   `json:"clerk_id" gorm:"column:clerk_id" form:"clerk_id"`                                                    // 店员id
	IsChannel              int8    `json:"is_channel" gorm:"column:is_channel" form:"is_channel"`                                              // 支付渠道(0微信公众号1微信小程序)
	IsRemind               int8    `json:"is_remind" gorm:"column:is_remind" form:"is_remind"`                                                 // 消息提醒
	IsSystemDel            int8    `json:"is_system_del" gorm:"column:is_system_del" form:"is_system_del"`                                     // 后台是否删除
	ChannelType            string  `json:"channel_type" gorm:"column:channel_type" form:"channel_type"`                                        // 用户访问端标识
	Province               string  `json:"province" gorm:"column:province" form:"province"`                                                    // 用户省份
	ExpressDump            string  `json:"express_dump" gorm:"column:express_dump" form:"express_dump"`                                        // 订单面单打印信息
	VirtualType            int8    `json:"virtual_type" gorm:"column:virtual_type" form:"virtual_type"`                                        // 虚拟商品类型
	VirtualInfo            string  `json:"virtual_info" gorm:"column:virtual_info" form:"virtual_info"`                                        // 虚拟商品信息
	PayUid                 int64   `json:"pay_uid" gorm:"column:pay_uid" form:"pay_uid"`                                                       // 支付用户uid
	CustomForm             string  `json:"custom_form" gorm:"column:custom_form" form:"custom_form"`                                           // 自定义表单
	StaffId                int64   `json:"staff_id" gorm:"column:staff_id" form:"staff_id"`                                                    // 员工id
	AgentId                int64   `json:"agent_id" gorm:"column:agent_id" form:"agent_id"`                                                    // 代理id
	DivisionId             int64   `json:"division_id" gorm:"column:division_id" form:"division_id"`                                           // 事业部id
	StaffBrokerage         float64 `json:"staff_brokerage" gorm:"column:staff_brokerage" form:"staff_brokerage"`                               // 员工返佣
	AgentBrokerage         float64 `json:"agent_brokerage" gorm:"column:agent_brokerage" form:"agent_brokerage"`                               // 代理返佣
	DivisionBrokerage      float64 `json:"division_brokerage" gorm:"column:division_brokerage" form:"division_brokerage"`                      // 事业部返佣
	orm.SoftDeletes
}
